{% extends "admin/change_list.html" %}
{% load i18n admin_urls static %}

{% block extrastyle %}
    {{ block.super }}
    <style>
        .button {
            display: inline-block;
            padding: 6px 12px;
            margin-bottom: 0;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.42857143;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            cursor: pointer;
            background-color: #1890ff;
            border: 1px solid transparent;
            border-radius: 4px;
            color: #fff;
            text-decoration: none;
        }
        .button:hover {
            background-color: #40a9ff;
            color: #fff;
            text-decoration: none;
        }
        .success {
            color: #52c41a;
            font-weight: bold;
        }
        .error {
            color: #f5222d;
            font-weight: bold;
        }
        .object-tools {
            margin-top: -32px;
        }
    </style>
{% endblock %}

{% block object-tools %}
    <ul class="object-tools">
        {% block object-tools-items %}
            {{ block.super }}
        {% endblock %}
    </ul>
{% endblock %}

{% block content %}
    {{ block.super }}
    <script>
        (function($) {
            $(document).ready(function() {
                // 添加批量操作按钮
                var $actions = $('.actions select[name="action"]');
                if ($actions.length) {
                    $actions.append(
                        $('<option>').val('execute_selected').text('执行选中的测试用例'),
                        $('<option>').val('generate_report').text('生成测试报告')
                    );
                }
            });
        })(django.jQuery);
    </script>
{% endblock %} 